import  java.util.Random;
public class ArrayText1 {
    public static void main(String[] args) {
        int [] arr = new int[10];
        Random r = new Random();
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            int number = r.nextInt(100) + 1;
            arr[i] = number;
        }
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        System.out.println("数据的和为:" + sum);
        double avg = sum / arr.length;
        System.out.println("平均数是:" + avg);
        int count = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] < avg){
                count++;
            }
        }
        System.out.println(count);
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i] + " ");
        }

    }
}
